#include <57header.h>

void func(int num){
    printf("func run deal begin \n");

    sleep(30);

    printf("func over \n");
}
int main(int argc,char*argv[])
{

    // 注册2号信号的处理逻辑-> func
    // signal(2, func);
    

    struct sigaction act, old;
    memset(&act, 0, sizeof(act));
    memset(&old, 0, sizeof(old));

    // 
    act.sa_flags = SA_NODEFER;
    act.sa_handler = func;

    sigaction(2, &act, &old);


    while(1);
    return 0;
}

